self.onmessage = (event) => {
  const { buffer, type } = event.data
  const url = createBlobUrl(buffer, type)
  postMessage(url)
}

function createBlobUrl(buffer, type) {
  const blob = new Blob([buffer], { type }) // 根据 'buffer' 和 'mime type'
  // 使用Blob对象创建一个URL
  const url = URL.createObjectURL(blob)
  return url
}
